package cn.org.eshow.service;


import cn.org.eshow.bean.query.CouponQuery;
import cn.org.eshow.common.page.Page;
import cn.org.eshow.model.Coupon;

import javax.jws.WebService;
import java.util.List;

@WebService
public interface CouponManager extends GenericManager<Coupon, Integer> {

    List<Coupon> list(CouponQuery query);

    Page<Coupon> search(CouponQuery query);

    Coupon check(CouponQuery query);

    long count(CouponQuery query);

    /**
     * 添加优惠券信息
     *
     * @param coupon  优惠券信息
     * @param userIds 用户IDs
     */
    void distribution(Coupon coupon, String userIds);
}